﻿using B.S.Databasic.Domain.RBAC;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.Databasic.Infrastructure
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class MyDbContext : DbContext
    {
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 权限实体
        /// </summary>
        public DbSet<PermissionModel> PermissionModel { get; set; }
        /// <summary>
        /// 角色实体
        /// </summary>
        public DbSet<RoleModel> RoleModel { get; set; }
        /// <summary>
        /// 权限角色中间实体
        /// </summary>
        public DbSet<PermissionRoleModel> PermissionRoleModel { get; set; }
        /// <summary>
        /// 角色实体
        /// </summary>
        public DbSet<AccountModel> AccountModel { get; set; }
        /// <summary>
        /// 权限角色中间实体
        /// </summary>
        public DbSet<AccountRoleModel> AccountRoleModel { get; set; }
    }
}
